<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8"%>
<jsp:useBean id="pageBean" scope="request" class="com.agileai.hotweb.domain.PageBean"/>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>流程定义管理</title>
<%@include file="/jsp/inc/resource.inc.jsp"%>
<script language="javascript">
function checkExistWfCode(){
	if ($('#operaType').val() == 'insert'){
		postRequest('form1',{actionType:'checkExistWfCode',onComplete:function(rspText){
			if (rspText != 'exist'){
				doSubmit({actionType:'save'});
			}else{
				writeErrorMsg('流程编码重复，请重新输入！');
			}
		}});	
	}else{
		doSubmit({actionType:'save'});	
	}
}
</script>
</head>
<body>
<form action="<%=pageBean.getHandlerURL()%>" name="form1" id="form1" method="post">
<%@include file="/jsp/inc/message.inc.jsp"%>
<div id="__ParamBar__" style="float: right;">&nbsp;</div>
<div id="__ToolBar__">
<table border="0" cellpadding="0" cellspacing="1">
<tr height="24px;">
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" align="center" onClick="checkExistWfCode()"><input value="&nbsp;" type="button" class="saveImgBtn" id="saveImgBtn" title="保存" />保存</td>
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" align="center" onClick="goToBack();"><input value="&nbsp;" type="button" class="backImgBtn" title="返回" />返回</td>
</tr>
</table>
</div>
<table class="detailTable" cellspacing="0" cellpadding="0">
<tr>
	<th width="100" nowrap>编码</th>
	<td><input label="编码" <%=pageBean.readonly(!"insert".equals(pageBean.getOperaType()))%> id="WFP_CODE" name="WFP_CODE" type="text" value="<%=pageBean.inputValue("WFP_CODE")%>" size="24" class="text" />
</td>
</tr>
<tr>
	<th width="100" nowrap>名称</th>
	<td><input label="名称" id="WFP_NAME" name="WFP_NAME" type="text" value="<%=pageBean.inputValue("WFP_NAME")%>" size="24" class="text" />
</td>
</tr>
<tr>
	<th width="100" nowrap>分组</th>
	<td><select name="WFP_GROUP" label="分组" id="WFP_GROUP"><%=pageBean.selectValue("WFP_GROUP")%></select>
</td>
</tr>
<tr>
	<th width="100" nowrap>状态</th>
	<td><input name="WFP_STATE_NAME" type="text" class="text" id="WFP_STATE_NAME" value="<%=pageBean.selectedText("WFP_STATE")%>" size="24" readonly="readonly" label="状态" />
    <input name="WFP_STATE" type="hidden" id="WFP_STATE" value="<%=pageBean.selectedValue("WFP_STATE")%>" size="24" readonly="readonly" label="版本" />
</td>
</tr>
<tr>
	<th width="100" nowrap>版本</th>
	<td><input name="WFP_VERSION" type="text" class="text" id="WFP_VERSION" value="<%=pageBean.inputValue("WFP_VERSION")%>" size="24" readonly="readonly" label="版本" />
</td>
</tr>
<tr>
	<th width="100" nowrap>创建时间</th>
	<td><input label="创建时间" id="WFP_CREATE_TIME" name="WFP_CREATE_TIME" type="text" value="<%=pageBean.inputTime("WFP_CREATE_TIME")%>" size="24" class="text" readonly="readonly" />
</td>
</tr>
<tr>
	<th width="100" nowrap>创建人</th>
	<td><input name="WFP_CREATER" type="hidden" id="WFP_CREATER" value="<%=pageBean.inputValue("WFP_CREATER")%>" />
	<input name="WFP_CREATER_NAME" type="text" class="text" id="WFP_CREATER_NAME" value="<%=pageBean.inputValue("WFP_CREATER_NAME")%>" size="24" readonly="readonly" label="创建人" />
</td>
</tr>
<tr>
	<th width="100" nowrap>修改时间</th>
	<td><input label="修改时间" id="WFP_MODIFY_TIME" name="WFP_MODIFY_TIME" type="text" value="<%=pageBean.inputTime("WFP_MODIFY_TIME")%>" size="24" class="text" readonly="readonly" />
</td>
</tr>
<tr>
	<th width="100" nowrap>修改人</th>
	<td><input name="WFP_MODIFIER" type="hidden" id="WFP_MODIFIER" value="<%=pageBean.inputValue("WFP_MODIFIER")%>" />
	<input name="WFP_MODIFIER_NAME" type="text" class="text" id="WFP_MODIFIER_NAME" value="<%=pageBean.inputValue("WFP_MODIFIER_NAME")%>" size="24" readonly="readonly" label="修改人" />
</td>
</tr>
<tr>
	<th width="100" nowrap>备注</th>
	<td><textarea label="备注" name="WFP_DESC" cols="50" rows="4" class="text" id="WFP_DESC"><%=pageBean.inputValue("WFP_DESC")%></textarea>
</td>
</tr>
</table>
<input type="hidden" name="actionType" id="actionType" value=""/>
<input type="hidden" name="operaType" id="operaType" value="<%=pageBean.getOperaType()%>"/>
<input type="hidden" name="WFP_ID" id="WFP_ID" value="<%=pageBean.inputValue("WFP_ID")%>"/>
<input type="hidden" name="WFP_LOGO_URL" id="WFP_LOGO_URL" value="<%=pageBean.inputValue("WFP_LOGO_URL")%>"/>
</form>
<script language="javascript">
requiredValidator.add("WFP_CODE","WFP_NAME","WFP_GROUP");
lengthValidators[0].set(64).add("WFP_CODE");
lengthValidators[1].set(64).add("WFP_NAME");
lengthValidators[2].set(256).add("WFP_DESC");
lengthValidators[3].set(32).add("WFP_STATE");
lengthValidators[4].set(64).add("WFP_VERSION");
datetimeValidators[0].set("yyyy-MM-dd HH:mm").add("WFP_CREATE_TIME");
datetimeValidators[1].set("yyyy-MM-dd HH:mm").add("WFP_MODIFY_TIME");
rawCharValidator.add("WFP_CODE");
</script>
</body>
</html>
<%@include file="/jsp/inc/scripts.inc.jsp"%>
